package jspPrinter;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.jsp.JspWriter;

import modelo.LimitesEvento;

import controleBD.UsuarioEventoDAO;

public class ListaPaginaRemover {

	public static void imprimir(JspWriter out, String username) throws IOException{
		
		
		UsuarioEventoDAO eventoDAO = new UsuarioEventoDAO();
		
		
		ArrayList<LimitesEvento> lista = eventoDAO.retornaEventos(username);
		
		
		
		for(int i = 0; i<lista.size(); i++){
			if(i%2==0){
				out.println("<tr class=\"cinza\">");
			}else out.println("<tr class=\"azul\">");
			
			out.println("<td>Evento "+ lista.get(i).getEvento() +"</td><td>M&iacute;nimo: "+ lista.get(i).getMin() +"</td><td>M&aacute;ximo: "+ lista.get(i).getMax() +"</td>");
			out.println("<td><input type=\"radio\" name=\"check\"value=\""+ i + "\"></td>");
			out.println("</tr>");
		}
		
		
	}
}
